-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the runtime value of arguments to operations #5206
base: main
Are you sure you want to change the base?
Conversation
QA Wolf here! As you write new code it's important that your test coverage is keeping up. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Are you concerned about the operations becoming a lot bigger? |
6469b06
to
35a285d
Compare
e14ef5b
to
3832603
Compare
3832603
to
fafe35c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5206 +/- ##
==========================================
+ Coverage 85.83% 85.84% +0.01%
==========================================
Files 94 94
Lines 34758 34848 +90
==========================================
+ Hits 29833 29914 +81
- Misses 4925 4934 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! I'm excited to check it out more thoroughly on Monday, looks really promising
src/wasm-lib/kcl/tests/artifact_graph_example_code_offset_planes/ops.snap
Outdated
Show resolved
Hide resolved
This is a good addition, I think the artifactId's will help a lot for getting these other edit flows to work. One issue I see is with With the following KCL:
I get the following JS object for the operations: [
{
"type": "StdLibCall",
"name": "startSketchOn",
"unlabeledArg": null,
"labeledArgs": {
"data": {
"value": {
"type": "String",
"value": "XZ",
"__meta": [
{
"sourceRange": [
26,
30,
0
]
}
]
},
"sourceRange": [
26,
30,
0
]
}
},
"sourceRange": [
12,
31,
0
]
},
{
"type": "StdLibCall",
"name": "extrude",
"unlabeledArg": null,
"labeledArgs": {
"length": {
"value": {
"type": "Number",
"value": 100,
"__meta": [
{
"sourceRange": [
106,
109,
0
]
}
]
},
"sourceRange": [
106,
109,
0
]
},
"sketch_set": {
"artifactIds": [
"487cfafc-927a-423d-9e6b-63ed3ac2dba0"
],
"sourceRange": [
111,
120,
0
]
}
},
"sourceRange": [
98,
121,
0
]
},
{
"type": "StdLibCall",
"name": "shell",
"unlabeledArg": null,
"labeledArgs": {
"data": {
"sourceRange": [
139,
174,
0
]
},
"solid_set": {
"artifactIds": [
"dac9e1e6-0852-475e-9464-f25146fb423d"
],
"sourceRange": [
176,
186,
0
]
}
},
"sourceRange": [
133,
187,
0
]
}
] I think I can get to the proper selection of the face artifact using the |
07201da
to
2bd5f8d
Compare
5639dc6
to
e284472
Compare
45053f1
to
18d5980
Compare
e284472
to
fbfaaa7
Compare
It seems like you want the full nested structure, which I was trying to avoid, but doing that should provide all the info you could ever want. I duplicated the entire structure of This is what a shell operation looks like.
|
fbfaaa7
to
1d93cd6
Compare
4af1eb9
to
6a0e9d1
Compare
6a0e9d1
to
00aae25
Compare
00aae25
to
e10532e
Compare
I guess I'm a little confused. We should have a huddle about this. Because it seems contradictory to want to use the expression, but also have the nested values. Example:
For the
I thought you wanted the value so that you could access deeply into the object, like We already have the source range for the expression. So if you want to get the KCL of the expression
Units are part of numbers now in KCL. A lone numeric value is ambiguous without its units. The numeric type now includes what dimension and unit it is. I added it because it's available in the interpreter now, and it seems like we'd want the user to be able to see and/or edit it. I know that explicit units as in
It seems useful because it allows us to tie it to the artifact graph. But if you don't think you need it, I'm happy to remove as much as possible from being exposed. |
You're absolutely right @jtran, thanks for huddling with me.
|
437ce3d
to
e3e1005
Compare
Resolves #5187.
Using the full values made the size of Operations a lot bigger. We only include UUIDs, bools, numbers, and strings. Geometry values like sketches only contain their artifact ID so that the UI can look it up in the artifact graph. TagDeclarator data isn't included because it doesn't seem to be needed, and the plan seems to be to remove them eventually.
Uses #5205.